let code = {};

code.base = `
<template>
    <Button type="primary" @click="personalCheck">人员选择</Button>
    <orgTree
        :visible="orgTreeVisible"
        :option="{deptFlag: false, userFlag: true, singleFlag: true}"
        @update:visible="orgTreeVisible = false"
        @on-save="saveAuditUser"
    />
</template>
<script>
export default {
    name: 'orgTree',
    data() {
        return {
            orgTreeVisible: false,
        }
    },
    methods: {
        saveAuditUser(userList) {
            this.userList = userList ;
        },
        personalCheck() {
            this.orgTreeVisible = true;
        },
    }
}
</script>
`;

code.change = `
<template>
    <Button type="primary" @click="depCheck">部门选择</Button>
    <orgTree
        :visible="orgTreeVisibleDep"
        :option="{deptFlag: true, userFlag: false, singleFlag: true}"
        @update:visible="orgTreeVisibleDep = false"
        @on-save="saveAuditDep"
    />
</template>
<script>
export default {
    name: 'orgTree',
    data() {
        return {
            orgTreeVisibleDep: false,
        }
    },
    methods: {
        saveAuditUser(depList) {
            this.depList = depList ;
        },
        personalCheck() {
            this.orgTreeVisibleDep = true;
        },
    }
}
</script>
`;

export default code;
